import { getUser } from '@/api/role';

export default {
  name: 'rolePage',
  data() {
    return {
      tableData: [],
      total: 0,
    };
  },
  created() {
    this.getList();
  },
  methods: {
    async getList() {
      const res = await getUser();
      console.log('请求的结果', res);
      const { statusText, data } = res;
      if (statusText === 'OK') {
        this.tableData = data;
        this.total = data.total;
      }
    },
  },
};
